from django.conf.urls import patterns, include, url
import os
BASE_DIR = os.path.dirname(os.path.dirname(__file__))

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'^$', 'products.views.home', name='home'),
    # url(r'^ehulk/', include('ehulk.foo.urls')),
    url(r'^products/$','products.views.products'),
    url(r'^products/(?P<slug>[-\w]+)/$','products.views.product_single'),
    url(r'^products/(?P<slug>[-\w]+)/add$','cart.views.add'),

    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    (r'^media(?P<path>.*)$','django.views.static.serve',{'document_root':os.path.join(BASE_DIR,"static","media")}),
    (r'^static(?P<path>.*)$','django.views.static.serve',{'document_root':os.path.join(BASE_DIR,"static","static")}),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^contact/$','contact.views.contact'),

    url(r'^cart/$','cart.views.view'),
    url(r'^cart/delete/$','cart.views.delete'),
)
